<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>
        // Object.keys方法，返回一个数组，
        // 成员是参数对象自身的（不含继承的）所有可遍历（enumerable）属性的键名

        // var obj = {foo: 'bar', baz: 23};
        // console.log(Object.keys(obj));
        // ["foo", "baz"]

        let {keys, values, entries} = Object;
        let obj = {name: 'chen', age: 21, address: '江西'};

        for (let key of keys(obj)) {
            console.log(key);
        }
        console.log('-------------');

        for (let value of values(obj)) {
            console.log(value);
        }
        console.log('-------------');

        for (let [key, value] of entries(obj)) {
            console.log([key, value]);
        }

    </script>

</head>
<body>

</body>
</html>